24. Exercise: Implement Query
Code Query
Complete the query() method.
Exercise Code
Exercise: T09.05-Exercise-QueryAllTasks
Provider code
SOLUTION:
- Get readable access to the underlying task database
- Write match code and a switch-case to recognize the task directory and default case
- Query for the tasks directory
- Set a notification URI on the Cursor
UI code
SOLUTION:
- Use a ContentResolver to query for all of the task data, and sort that data by priority.